package onlinediary.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author
 * @since 2022-05-03
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_diary")
public class Diary implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 日记分组id
     */
    private Integer gId;

    @TableField(exist = false)
    private String gName;

    /**
     * 日记时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date time;

    /**
     * 日记内容
     */
    private String context;

    /**
     * 用户id
     */
    private Integer uId;


}
